<html>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<title>Section 2.2.&nbsp; UNIX Standardization</title>
<link rel="STYLESHEET" type="text/css" href="images/style.css">
<link rel="STYLESHEET" type="text/css" href="images/docsafari.css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/team.gif" width="60" height="17" border="0" align="absmiddle"  alt="Team BBL"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=ch02lev1sec1.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<a href=ch02lev1sec3.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
<br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top"><a name="ch02lev1sec2"></a>
<h3 class="docSection1Title">2.2. UNIX Standardization</h3>
<a name="ch02lev2sec1"></a>
<H4 class="docSection2Title">2.2.1. ISO C</H4>
<p class="docText">In late 1989, ANSI Standard X3.1591989 for the C programming language was approved. This standard has also been adopted as international standard ISO/IEC 9899:1990. ANSI is the American National Standards Institute, the U.S. member in the International Organization for Standardization (ISO). IEC stands for the International Electrotechnical Commission.</p>
<p class="docText"><a name="idd1e5170"></a><a name="idd1e5173"></a><a name="idd1e5178"></a><a name="idd1e5181"></a><a name="idd1e5184"></a><a name="idd1e5187"></a><a name="idd1e5190"></a><a name="idd1e5193"></a><a name="idd1e5196"></a><a name="idd1e5201"></a><a name="idd1e5204"></a>The C standard is now maintained and developed by the ISO/IEC international standardization working group for the C programming language, known as ISO/IEC JTC1/SC22/WG14, or WG14 for short. The intent of the ISO C standard is to provide portability of conforming C programs to a wide variety of operating systems, not only the UNIX System. This standard defines not only the syntax and semantics of the programming language but also a standard library [<a class="docLink" href="ch07.html#ch07">Chapter 7</a> of <a class="docLink" href="bib01.html#biblio01_027">ISO 1999</a>; <a class="docLink" href="bib01.html#biblio01_050">Plauger 1992</a>; <a class="docLink" href="app02.html#app02">Appendix B</a> of <a class="docLink" href="bib01.html#biblio01_029">Kernighan and Ritchie 1988</a>]. This library is important because all contemporary UNIX systems, such as the ones described in this book, provide the library routines that are specified in the C standard.</P>
<p class="docText">In 1999, the ISO C standard was updated and approved as ISO/IEC 9899:1999, largely to improve support for applications that perform numerical processing. The changes don't affect the POSIX standards described in this book, except for the addition of the <tt>restrict</tt> keyword to some of the function prototypes. This keyword is used to tell the compiler which pointer references can be optimized, by indicating that the object to which the pointer refers is accessed in the function only via that pointer.</P>
<p class="docText">As with most standards, there is a delay between the standard's approval and the modification of software to conform to it. As each vendor's compilation systems evolve, they add more support for the latest version of the ISO C standard.</P>
<blockquote>
<p class="docText">A summary of the current level of conformance of <tt>gcc</tt> to the 1999 version of the ISO C standard is available at <tt>http://www.gnu.org/software/gcc/c99status.html</tt>.</p>
</blockquote>
<p class="docText">The ISO C library can be divided into 24 areas, based on the headers defined by the standard. <a class="docLink" href="#ch02fig01">Figure 2.1</a> lists the headers defined by the C standard. The POSIX.1 standard includes these headers, as well as others. We also list which of these headers are supported by the four implementations (FreeBSD 5.2.1, Linux 2.4.22, Mac OS X 10.3, and Solaris 9) that are described later in this chapter.</P>
<a name="ch02fig01"></a><P><table cellspacing="0" class="allBorders" border="1" RULES="groups" cellpadding="5"><caption><H5 class="docTableTitle">Figure 2.1. Headers defined by the ISO C standard</h5></caption><colgroup><col width="100"><col width="50"><col width="50"><col width="75"><col width="50"><col width="200"></colgroup><thead><TR><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="middle"><p class="docText"><span class="docEmphRoman">Header</span></p></th><th class="bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">FreeBSD 5.2.1</span></P></th><th class="bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Linux 2.4.22</span></P></th><th class="bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Mac OS X 10.3</span></P></th><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Solaris 9</span></p></th><th class="bottomBorder thead" scope="col" align="center" valign="middle"><p class="docText"><span class="docEmphRoman">Description</span></P></th></TR></thead><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;assert.h&gt;</tt></P></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">verify program assertion</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;complex.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="rightBorder" align="center" valign="top">&nbsp;</TD><td class="docTableCell" align="left" valign="top"><p class="docText">complex arithmetic support</P></TD></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;ctype.h&gt;</tt></p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><TD class="docTableCell" align="left" valign="top"><p class="docText">character types</p></TD></tr><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;errno.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">error codes (<a class="docLink" href="ch01lev1sec7.html#ch01lev1sec7">Section 1.7</a>)</p></TD></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;fenv.h&gt;</tt></P></TD><td class="docTableCell" align="center" valign="top">&nbsp;</TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="rightBorder" align="center" valign="top">&nbsp;</TD><td class="docTableCell" align="left" valign="top"><p class="docText">floating-point environment</P></TD></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;float.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">floating-point constants</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;inttypes.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">integer type format conversion</P></td></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;iso646.h&gt;</tt></P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">alternate relational operator macros</p></TD></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;limits.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><TD class="docTableCell" align="left" valign="top"><p class="docText">implementation constants (<a class="docLink" href="ch02lev1sec5.html#ch02lev1sec5">Section 2.5</a>)</P></td></TR><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;locale.h&gt;</tt></p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">locale categories</P></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;math.h&gt;</tt></P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">mathematical constants</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;setjmp.h&gt;</tt></p></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">nonlocal goto (<a class="docLink" href="ch07lev1sec10.html#ch07lev1sec10">Section 7.10</a>)</P></TD></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;signal.h&gt;</tt></P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="docTableCell" align="left" valign="top"><p class="docText">signals (<a class="docLink" href="ch10.html#ch10">Chapter 10</a>)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;stdarg.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">variable argument lists</P></td></TR><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;stdbool.h&gt;</tt></p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">boolean type and values</p></TD></tr><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;stddef.h&gt;</tt></P></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">standard definitions</p></td></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;stdint.h&gt;</tt></p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="rightBorder" align="center" valign="top">&nbsp;</TD><TD class="docTableCell" align="left" valign="top"><p class="docText">integer types</p></TD></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;stdio.h&gt;</tt></P></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">standard I/O library (<a class="docLink" href="ch05.html#ch05">Chapter 5</a>)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;stdlib.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">utility functions</P></TD></tr><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;string.h&gt;</tt></P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">string operations</P></td></TR><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;tgmath.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top">&nbsp;</td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top">&nbsp;</td><td class="rightBorder" align="center" valign="top">&nbsp;</td><td class="docTableCell" align="left" valign="top"><p class="docText">type-generic math macros</p></td></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;time.h&gt;</tt></p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="left" valign="top"><p class="docText">time and date (<a class="docLink" href="ch06lev1sec10.html#ch06lev1sec10">Section 6.10</a>)</P></TD></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;wchar.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">extended multibyte and wide character support</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;wctype.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">wide character classification and mapping support</P></td></TR></table></p><BR>
<blockquote>
<p class="docText">The ISO C headers depend on which version of the C compiler is used with the operating system. When considering <a class="docLink" href="#ch02fig01">Figure 2.1</a>, note that FreeBSD 5.2.1 ships with version 3.3.3 of <tt>gcc</tt>, Solaris 9 ships with both version 2.95.3 and version 3.2 of <tt>gcc</tt>, Mandrake 9.2 (Linux 2.4.22) ships with version 3.3.1 of <tt>gcc</tt>, and Mac OS X 10.3 ships with version 3.3 of <tt>gcc</tt>. Mac OS X also includes older versions of <tt>gcc</tt>.</P>
</blockquote>

<a name="ch02lev2sec2"></a>
<H4 class="docSection2Title">2.2.2. IEEE POSIX</h4>
<p class="docText">POSIX is a family of standards developed by the IEEE (Institute of Electrical and Electronics Engineers). POSIX stands for Portable Operating System Interface. It originally referred only to the IEEE Standard 1003.11988the operating system interfacebut was later extended to include many of the standards and draft standards with the 1003 designation, including the shell and utilities (1003.2).</P>
<p class="docText">Of specific interest to this book is the 1003.1 operating system interface standard, whose goal is to promote the portability of applications among various UNIX System environments. This standard defines the services that must be provided by an operating system if it is to be &quot;POSIX compliant,&quot; and has been adopted by most computer vendors. Although the 1003.1 standard is based on the UNIX operating <a name="idd1e6029"></a><a name="idd1e6034"></a><a name="idd1e6039"></a><a name="idd1e6044"></a><a name="idd1e6049"></a><a name="idd1e6054"></a><a name="idd1e6059"></a><a name="idd1e6064"></a><a name="idd1e6069"></a><a name="idd1e6074"></a><a name="idd1e6079"></a><a name="idd1e6084"></a><a name="idd1e6089"></a><a name="idd1e6092"></a><a name="idd1e6095"></a><a name="idd1e6100"></a><a name="idd1e6105"></a><a name="idd1e6110"></a><a name="idd1e6115"></a><a name="idd1e6120"></a><a name="idd1e6125"></a><a name="idd1e6130"></a><a name="idd1e6135"></a><a name="idd1e6140"></a><a name="idd1e6145"></a><a name="idd1e6148"></a><a name="idd1e6153"></a><a name="idd1e6158"></a>system, the standard is not restricted to UNIX and UNIX-like systems. Indeed, some vendors supplying proprietary operating systems claim that these systems have been made POSIX compliant, while still leaving all their proprietary features in place.</P>
<p class="docText">Because the 1003.1 standard specifies an <span class="docEmphasis">interface</span> and not an <span class="docEmphasis">implementation</span>, no distinction is made between system calls and library functions. All the routines in the standard are called <span class="docEmphasis">functions</span>.</p>
<p class="docText">Standards are continually evolving, and the 1003.1 standard is no exception. The 1988 version of this standard, IEEE Standard 1003.11988, was modified and submitted to the International Organization for Standardization. No new interfaces or features were added, but the text was revised. The resulting document was published as IEEE Std 1003.11990 [<a class="docLink" href="bib01.html#biblio01_026">IEEE 1990</a>]. This is also the international standard ISO/IEC 99451:1990. This standard is commonly referred to as <span class="docEmphasis">POSIX.1</span>, which we'll use in this text.</P>
<p class="docText">The IEEE 1003.1 working group continued to make changes to the standard. In 1993, a revised version of the IEEE 1003.1 standard was published. It included 1003.1-1990 standard and the 1003.1b-1993 real-time extensions standard. In 1996, the standard was again updated as international standard ISO/IEC 99451:1996. It included interfaces for multithreaded programming, called <span class="docEmphasis">pthreads</span> for POSIX threads. More real-time interfaces were added in 1999 with the publication of IEEE Standard <a name="idd1e6192"></a>1003.1d-1999. A year later, IEEE Standard 1003.1j-2000 was published, including even more real-time interfaces, and IEEE Standard 1003.1q-2000 was published, adding event-tracing extensions to the standard.</P>
<p class="docText">The 2001 version of 1003.1 departed from the prior versions in that it combined several 1003.1 amendments, the 1003.2 standard, and portions of the Single UNIX Specification (SUS), Version 2 (more on this later). The resulting standard, IEEE Standard 1003.1-2001, includes the following other standards:</p>
<ul><li><p class="docList">ISO/IEC 9945-1 (IEEE Standard 1003.1-1996), which includes</p><UL><li><p class="docList">IEEE Standard 1003.1-1990</P></li><LI><p class="docList">IEEE Standard 1003.1b-1993 (real-time extensions)</p></li><li><p class="docList">IEEE Standard 1003.1c-1995 (pthreads)</p></li><li><p class="docList">IEEE Standard 1003.1i-1995 (real-time technical corrigenda)</p></li></ul></li><li><p class="docList">IEEE P1003.1a draft standard (system interface revision)</p></li><li><p class="docList">IEEE Standard 1003.1d-1999 (advanced real-time extensions)</p></li><li><p class="docList">IEEE Standard 1003.1j-2000 (more advanced real-time extensions)</P></LI><li><p class="docList">IEEE Standard 1003.1q-2000 (tracing)</P></LI><LI><p class="docList">IEEE Standard 1003.2d-1994 (batch extensions)</p></LI><LI><p class="docList">IEEE P1003.2b draft standard (additional utilities)</P></li><LI><p class="docList">Parts of IEEE Standard 1003.1g-2000 (protocol-independent interfaces)</p></LI><LI><p class="docList">ISO/IEC 9945-2 (IEEE Standard 1003.2-1993)</P></li><LI><p class="docList">The Base Specifications of the Single UNIX Specification, version 2, which include</P><ul><LI><p class="docList">System Interface Definitions, Issue 5</P></li><li><p class="docList">Commands and Utilities, Issue 5</p></li><LI><p class="docList">System Interfaces and Headers, Issue 5</p></LI></ul></LI><li><p class="docList">Open Group Technical Standard, Networking Services, Issue 5.2</p></li><li><p class="docList">ISO/IEC 9899:1999, Programming Languages - C</p></li></ul>
<p class="docText"><a class="docLink" href="#ch02fig02">Figure 2.2</a>, <a class="docLink" href="#ch02fig03">Figure 2.3</a>, and <a class="docLink" href="#ch02fig04">Figure 2.4</a> summarize the required and optional headers as specified by POSIX.1. Because POSIX.1 includes the ISO C standard library functions, it also requires the headers listed in <a class="docLink" href="#ch02fig01">Figure 2.1</a>. All four figures summarize which headers are included in the implementations discussed in this book.</p>
<a name="ch02fig02"></a><p><table cellspacing="0" class="allBorders" border="1" RULES="groups" cellpadding="5"><caption><h5 class="docTableTitle">Figure 2.2. Required headers defined by the POSIX standard</h5></caption><colgroup><col width="100"><col width="60"><col width="60"><col width="60"><col width="50"><col width="175"></colgroup><thead><tr><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="middle"><p class="docText"><span class="docEmphRoman">Header</span></p></th><th class="bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">FreeBSD 5.2.1</span></p></th><th class="bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Linux 2.4.22</span></p></th><th class="bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Mac OS X 10.3</span></p></th><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Solaris 9</span></p></th><th class="bottomBorder thead" scope="col" align="center" valign="middle"><p class="docText"><span class="docEmphRoman">Description</span></P></th></TR></thead><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;dirent.h&gt;</tt></P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">directory entries (<a class="docLink" href="ch04lev1sec21.html#ch04lev1sec21">Section 4.21</a>)</p></TD></TR><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;fcntl.h&gt;</tt></p></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">file control (<a class="docLink" href="ch03lev1sec14.html#ch03lev1sec14">Section 3.14</a>)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;fnmatch.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="left" valign="top"><p class="docText">filename-matching types</P></td></TR><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;glob.h&gt;</tt></p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">pathname pattern-matching types</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;grp.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="left" valign="top"><p class="docText">group file (<a class="docLink" href="ch06lev1sec4.html#ch06lev1sec4">Section 6.4</a>)</P></TD></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;netdb.h&gt;</tt></P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="left" valign="top"><p class="docText">network database operations</p></td></tr><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;pwd.h&gt;</tt></P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">password file (<a class="docLink" href="ch06lev1sec2.html#ch06lev1sec2">Section 6.2</a>)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;regex.h&gt;</tt></P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">regular expressions</P></td></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;tar.h&gt;</tt></P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText"><tt>tar</tt> archive values</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;termios.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="left" valign="top"><p class="docText">terminal I/O (<a class="docLink" href="ch18.html#ch18">Chapter 18</a>)</P></TD></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;unistd.h&gt;</tt></p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><TD class="docTableCell" align="left" valign="top"><p class="docText">symbolic constants</p></TD></tr><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;utime.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">file times (<a class="docLink" href="ch04lev1sec19.html#ch04lev1sec19">Section 4.19</a>)</p></TD></TR><tr><TD class="rightBorder bottomBorder" align="left" valign="top"><p class="docText"><tt>&lt;wordexp.h&gt;</tt></P></TD><td class="bottomBorder" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="bottomBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="bottomBorder" align="left" valign="top">&nbsp;</TD><TD class="rightBorder bottomBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="bottomBorder" align="left" valign="top"><p class="docText">word-expansion types</P></td></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;arpa/inet.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">Internet definitions (<a class="docLink" href="ch16.html#ch16">Chapter 16</a>)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;net/if.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">socket local interfaces (<a class="docLink" href="ch16.html#ch16">Chapter 16</a>)</p></TD></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;netinet/in.h&gt;</tt></P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">Internet address family (<a class="docLink" href="ch16lev1sec3.html#ch16lev1sec3">Section 16.3</a>)</P></td></tr><tr><td class="rightBorder bottomBorder" align="left" valign="top"><p class="docText"><tt>&lt;netinet/tcp.h&gt;</tt></p></td><td class="bottomBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="bottomBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="bottomBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder bottomBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="bottomBorder" align="left" valign="top"><p class="docText">Transmission Control Protocol definitions</p></TD></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/mman.h&gt;</tt></P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">memory management declarations</p></td></tr><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/select.h&gt;</tt></p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText"><tt>select</tt> function (<a class="docLink" href="ch14lev1sec5.html#ch14lev2sec14">Section 14.5.1</a>)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/socket.h&gt;</tt></p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">sockets interface (<a class="docLink" href="ch16.html#ch16">Chapter 16</a>)</P></TD></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/stat.h&gt;</tt></p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">file status (<a class="docLink" href="ch04.html#ch04">Chapter 4</a>)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/times.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">process times (<a class="docLink" href="ch08lev1sec16.html#ch08lev1sec16">Section 8.16</a>)</p></TD></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/types.h&gt;</tt></P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">primitive system data types (<a class="docLink" href="ch02lev1sec8.html#ch02lev1sec8">Section 2.8</a>)</P></td></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/un.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">UNIX domain socket definitions (<a class="docLink" href="ch17lev1sec3.html#ch17lev1sec3">Section 17.3</a>)</p></td></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/utsname.h&gt;</tt></P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">system name (<a class="docLink" href="ch06lev1sec9.html#ch06lev1sec9">Section 6.9</a>)</P></td></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/wait.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">process control (<a class="docLink" href="ch08lev1sec6.html#ch08lev1sec6">Section 8.6</a>)</p></td></tr></table></p><br>
<a name="ch02fig03"></a><p><table cellspacing="0" class="allBorders" border="1" RULES="groups" cellpadding="5"><caption><h5 class="docTableTitle">Figure 2.3. XSI extension headers defined by the POSIX standard</h5></caption><colgroup><col width="100"><col width="60"><col width="60"><col width="60"><col width="50"><col width="175"></colgroup><thead><tr><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="middle"><p class="docText"><span class="docEmphRoman">Header</span></p></th><th class="bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">FreeBSD 5.2.1</span></P></th><th class="bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Linux 2.4.22</span></P></th><th class="bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Mac OS X 10.3</span></p></th><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Solaris 9</span></P></th><th class="bottomBorder thead" scope="col" align="center" valign="middle"><p class="docText"><span class="docEmphRoman">Description</span></P></th></TR></thead><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;cpio.h&gt;</tt></P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="left" valign="top">&nbsp;</TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText"><tt>cpio</tt> archive values</p></td></tr><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;dlfcn.h&gt;</tt></p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">dynamic linking</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;fmtmsg.h&gt;</tt></p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top">&nbsp;</TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">message display structures</P></TD></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;ftw.h&gt;</tt></P></td><TD class="docTableCell" align="left" valign="top">&nbsp;</TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top">&nbsp;</TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">file tree walking (<a class="docLink" href="ch04lev1sec21.html#ch04lev1sec21">Section 4.21</a>)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;iconv.h&gt;</tt></p></td><td class="docTableCell" align="left" valign="top">&nbsp;</td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">codeset conversion utility</p></TD></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;langinfo.h&gt;</tt></P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">language information constants</p></td></tr><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;libgen.h&gt;</tt></p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">definitions for pattern-matching function</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;monetary.h&gt;</tt></p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">monetary types</P></TD></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;ndbm.h&gt;</tt></p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top">&nbsp;</td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="docTableCell" align="left" valign="top"><p class="docText">database operations</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;nl_types.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">message catalogs</P></td></TR><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;poll.h&gt;</tt></p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">poll function (<a class="docLink" href="ch14lev1sec5.html#ch14lev2sec15">Section 14.5.2</a>)</p></TD></tr><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;search.h&gt;</tt></P></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">search tables</p></td></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;strings.h&gt;</tt></p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="left" valign="top"><p class="docText">string operations</P></TD></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;syslog.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">system error logging (<a class="docLink" href="ch13lev1sec4.html#ch13lev1sec4">Section 13.4</a>)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;ucontext.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">user context</P></td></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;ulimit.h&gt;</tt></P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">user limits</p></TD></tr><tr><td class="rightBorder bottomBorder" align="left" valign="top"><p class="docText"><tt>&lt;utmpx.h&gt;</tt></p></td><td class="bottomBorder" align="left" valign="top">&nbsp;</td><td class="bottomBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="bottomBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder bottomBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="bottomBorder" align="left" valign="top"><p class="docText">user accounting database</p></TD></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/ipc.h&gt;</tt></P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">IPC (<a class="docLink" href="ch15lev1sec6.html#ch15lev1sec6">Section 15.6</a>)</p></TD></TR><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/msg.h&gt;</tt></p></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="docTableCell" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">message queues (<a class="docLink" href="ch15lev1sec7.html#ch15lev1sec7">Section 15.7</a>)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/resource.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">resource operations (<a class="docLink" href="ch07lev1sec11.html#ch07lev1sec11">Section 7.11</a>)</p></TD></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/sem.h&gt;</tt></P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">semaphores (<a class="docLink" href="ch15lev1sec8.html#ch15lev1sec8">Section 15.8</a>)</P></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/shm.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">shared memory (<a class="docLink" href="ch15lev1sec9.html#ch15lev1sec9">Section 15.9</a>)</p></TD></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/statvfs.h&gt;</tt></P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="docTableCell" align="left" valign="top">&nbsp;</td><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">file system information</P></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/time.h&gt;</tt></P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">time types</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/timeb.h&gt;</tt></p></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">additional date and time definitions</P></TD></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sys/uio.h&gt;</tt></P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="docTableCell" align="left" valign="top"><p class="docText">vector I/O operations (<a class="docLink" href="ch14lev1sec7.html#ch14lev1sec7">Section 14.7</a>)</p></td></tr></table></p><br>
<a name="ch02fig04"></a><p><table cellspacing="0" class="allBorders" border="1" RULES="groups" cellpadding="5"><caption><h5 class="docTableTitle">Figure 2.4. Optional headers defined by the POSIX standard</h5></caption><colgroup><col width="100"><col width="60"><col width="60"><col width="60"><col width="50"><col width="175"></colgroup><thead><tr><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="middle"><p class="docText"><span class="docEmphRoman">Header</span></p></th><th class="bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">FreeBSD 5.2.1</span></p></th><th class="bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Linux 2.4.22</span></p></th><th class="bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Mac OS X 10.3</span></p></th><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">Solaris 9</span></p></th><th class="bottomBorder thead" scope="col" align="center" valign="middle"><p class="docText"><span class="docEmphRoman">Description</span></p></th></TR></thead><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;aio.h&gt;</tt></P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">asynchronous I/O</P></td></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;mqueue.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top">&nbsp;</td><TD class="docTableCell" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">message queues</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;pthread.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">threads (<a class="docLink" href="ch11.html#ch11">Chapters 11</a> and <a class="docLink" href="ch12.html#ch12">12</a>)</P></TD></tr><TR><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;sched.h&gt;</tt></P></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">execution scheduling</P></td></TR><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;semaphore.h&gt;</tt></p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">semaphores</P></TD></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;spawn.h&gt;</tt></P></td><TD class="docTableCell" align="left" valign="top">&nbsp;</TD><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="left" valign="top">&nbsp;</TD><TD class="rightBorder" align="left" valign="top">&nbsp;</TD><td class="docTableCell" align="left" valign="top"><p class="docText">real-time spawn interface</P></TD></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;stropts.h&gt;</tt></p></td><td class="docTableCell" align="left" valign="top">&nbsp;</td><TD class="docTableCell" align="center" valign="top"><p class="docText">&#8226;</p></TD><td class="docTableCell" align="left" valign="top">&nbsp;</TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="docTableCell" align="left" valign="top"><p class="docText">XSI STREAMS interface (<a class="docLink" href="ch14lev1sec4.html#ch14lev1sec4">Section 14.4</a>)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>&lt;trace.h&gt;</tt></p></td><td class="docTableCell" align="left" valign="top">&nbsp;</td><td class="docTableCell" align="left" valign="top">&nbsp;</td><td class="docTableCell" align="left" valign="top">&nbsp;</td><TD class="rightBorder" align="left" valign="top">&nbsp;</TD><td class="docTableCell" align="left" valign="top"><p class="docText">event tracing</P></TD></TR></table></p><BR>
<p class="docText">In this text we describe the 2001 version of POSIX.1, which includes the functions specified in the ISO C standard. Its interfaces are divided into required ones and optional ones. The optional interfaces are further divided into 50 sections, based on functionality. The sections containing nonobsolete programming interfaces are summarized in <a class="docLink" href="#ch02fig05">Figure 2.5</a> with their respective option codes. Option codes are two- to three-character abbreviations that help identify the interfaces that belong to each functional area. The option codes highlight text on manual pages where interfaces depend on the support of a particular option. Many of the options deal with real-time extensions.</P>
<a name="ch02fig05"></a><P><table cellspacing="0" class="allBorders" border="1" RULES="groups" cellpadding="5"><caption><h5 class="docTableTitle">Figure 2.5. POSIX.1 optional interface groups and codes</H5></caption><colgroup><col width="50"><col width="75"><col width="150"><col width="225"></colgroup><thead><tr><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="middle"><p class="docText"><span class="docEmphRoman">Code</span></P></th><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="bottom"><p class="docText"><span class="docEmphRoman">SUS mandatory</span></P></th><th class="rightBorder bottomBorder thead" scope="col" align="center" valign="middle"><p class="docText"><span class="docEmphRoman">Symbolic constant</span></P></th><th class="bottomBorder thead" scope="col" align="center" valign="middle"><p class="docText"><span class="docEmphRoman">Description</span></p></th></TR></thead><TR><td class="rightBorder" align="left" valign="top"><p class="docText">ADV</P></TD><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_ADVISORY_INFO</tt></p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">advisory information (real-time)</P></td></TR><tr><td class="rightBorder" align="left" valign="top"><p class="docText">AIO</p></td><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_ASYNCHRONOUS_IO</tt></p></td><td class="docTableCell" align="left" valign="top"><p class="docText">asynchronous input and output (real-time)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">BAR</p></td><TD class="rightBorder" align="left" valign="top">&nbsp;</TD><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_BARRIERS</tt></P></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">barriers (real-time)</p></TD></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText">CPT</P></td><TD class="rightBorder" align="left" valign="top">&nbsp;</TD><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_CPUTIME</tt></p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">process CPU time clocks (real-time)</p></TD></TR><tr><td class="rightBorder" align="left" valign="top"><p class="docText">CS</p></td><TD class="rightBorder" align="left" valign="top">&nbsp;</td><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_CLOCK_SELECTION</tt></p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">clock selection (real-time)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">CX</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="docTableCell" align="left" valign="top"><p class="docText">extension to ISO C standard</p></td></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText">FSC</p></TD><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_FSYNC</tt></P></TD><td class="docTableCell" align="left" valign="top"><p class="docText">file synchronization</P></td></TR><TR><TD class="rightBorder" align="left" valign="top"><p class="docText">IP6</p></TD><TD class="rightBorder" align="left" valign="top">&nbsp;</td><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_IPV6</tt></P></td><td class="docTableCell" align="left" valign="top"><p class="docText">IPv6 interfaces</p></td></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText">MF</p></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_MAPPED_FILES</tt></p></td><td class="docTableCell" align="left" valign="top"><p class="docText">memory-mapped files</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">ML</p></td><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_MEMLOCK</tt></P></TD><td class="docTableCell" align="left" valign="top"><p class="docText">process memory locking (real-time)</P></TD></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText">MLR</P></TD><td class="rightBorder" align="left" valign="top">&nbsp;</TD><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_MEMLOCK_RANGE</tt></P></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">memory range locking (real-time)</p></TD></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText">MON</P></td><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_MONOTONIC_CLOCK</tt></P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">monotonic clock (real-time)</p></TD></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">MPR</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_MEMORY_PROTECTION</tt></p></td><td class="docTableCell" align="left" valign="top"><p class="docText">memory protection</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">MSG</P></TD><td class="rightBorder" align="left" valign="top">&nbsp;</TD><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_MESSAGE_PASSING</tt></P></td><TD class="docTableCell" align="left" valign="top"><p class="docText">message passing (real-time)</P></TD></tr><TR><td class="rightBorder" align="left" valign="top"><p class="docText">MX</P></TD><TD class="rightBorder" align="left" valign="top">&nbsp;</td><TD class="rightBorder" align="left" valign="top">&nbsp;</TD><td class="docTableCell" align="left" valign="top"><p class="docText">IEC 60559 floating-point option</P></TD></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">PIO</p></TD><td class="rightBorder" align="left" valign="top">&nbsp;</TD><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_PRIORITIZED_IO</tt></P></td><td class="docTableCell" align="left" valign="top"><p class="docText">prioritized input and output</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">PS</p></td><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_PRIORITIZED_SCHEDULING</tt></p></td><td class="docTableCell" align="left" valign="top"><p class="docText">process scheduling (real-time)</p></td></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText">RS</P></TD><TD class="rightBorder" align="left" valign="top">&nbsp;</td><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_RAW_SOCKETS</tt></P></TD><td class="docTableCell" align="left" valign="top"><p class="docText">raw sockets</P></td></TR><TR><TD class="rightBorder" align="left" valign="top"><p class="docText">RTS</p></TD><TD class="rightBorder" align="left" valign="top">&nbsp;</td><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_REALTIME_SIGNALS</tt></P></td><td class="docTableCell" align="left" valign="top"><p class="docText">real-time signals extension</p></td></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText">SEM</p></TD><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_SEMAPHORES</tt></p></td><td class="rightBorder" align="left" valign="top"><p class="docText">semaphores (real-time)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">SHM</p></td><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_SHARED_MEMORY_OBJECTS</tt></p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">shared memory objects (real-time)</p></TD></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText">SIO</P></TD><TD class="rightBorder" align="left" valign="top">&nbsp;</td><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_SYNCHRONIZED_IO</tt></p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">synchronized input and output (real-time)</P></td></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText">SPI</P></TD><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_SPIN_LOCKS</tt></p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">spin locks (real-time)</P></td></TR><tr><td class="rightBorder" align="left" valign="top"><p class="docText">SPN</p></td><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_SPAWN</tt></p></td><td class="docTableCell" align="left" valign="top"><p class="docText">spawn (real-time)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">SS</p></td><TD class="rightBorder" align="left" valign="top">&nbsp;</TD><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_SPORADIC_SERVER</tt></P></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">process sporadic server (real-time)</p></TD></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText">TCT</P></td><TD class="rightBorder" align="left" valign="top">&nbsp;</TD><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_THREAD_CPUTIME</tt></p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">thread CPU time clocks (real-time)</p></TD></TR><tr><td class="rightBorder" align="left" valign="top"><p class="docText">TEF</p></td><TD class="rightBorder" align="left" valign="top">&nbsp;</td><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_TRACE_EVENT_FILTER</tt></p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">trace event filter</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">THR</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_THREADS</tt></p></td><td class="docTableCell" align="left" valign="top"><p class="docText">threads</p></td></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText">TMO</P></TD><TD class="rightBorder" align="left" valign="top">&nbsp;</td><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_TIMEOUTS</tt></P></TD><td class="docTableCell" align="left" valign="top"><p class="docText">timeouts (real-time)</P></td></TR><TR><TD class="rightBorder" align="left" valign="top"><p class="docText">TMR</p></TD><TD class="rightBorder" align="left" valign="top">&nbsp;</td><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_TIMERS</tt></P></td><td class="docTableCell" align="left" valign="top"><p class="docText">timers (real-time)</p></td></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText">TPI</p></TD><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_THREAD_PRIO_INHERIT</tt></p></td><td class="docTableCell" align="left" valign="top"><p class="docText">thread priority inheritance (real-time)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">TPP</p></td><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_THREAD_PRIO_PROTECT</tt></p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">thread priority protection (real-time)</p></TD></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText">TPS</P></TD><TD class="rightBorder" align="left" valign="top">&nbsp;</td><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_THREAD_PRIORITY_SCHEDULING</tt></p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">thread execution scheduling (real-time)</P></td></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText">TRC</P></TD><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_TRACE</tt></p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">trace</P></td></TR><tr><td class="rightBorder" align="left" valign="top"><p class="docText">TRI</p></td><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_TRACE_INHERIT</tt></p></td><td class="docTableCell" align="left" valign="top"><p class="docText">trace inherit</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">TRL</p></td><TD class="rightBorder" align="left" valign="top">&nbsp;</TD><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_TRACE_LOG</tt></P></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">trace log</p></TD></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText">TSA</P></td><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_THREAD_ATTR_STACKADDR</tt></P></TD><td class="docTableCell" align="left" valign="top"><p class="docText">thread stack address attribute</P></TD></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">TSF</p></TD><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_THREAD_SAFE_FUNCTIONS</tt></p></td><td class="docTableCell" align="left" valign="top"><p class="docText">thread-safe functions</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">TSH</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</p></td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_THREAD_PROCESS_SHARED</tt></p></td><td class="docTableCell" align="left" valign="top"><p class="docText">thread process-shared synchronization</P></TD></tr><TR><TD class="rightBorder" align="left" valign="top"><p class="docText">TSP</P></td><TD class="rightBorder" align="left" valign="top">&nbsp;</TD><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_THREAD_SPORADIC_SERVER</tt></p></TD><td class="docTableCell" align="left" valign="top"><p class="docText">thread sporadic server (real-time)</P></TD></TR><tr><TD class="rightBorder" align="left" valign="top"><p class="docText">TSS</P></td><TD class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_THREAD_ATTR_STACKSIZE</tt></p></td><TD class="docTableCell" align="left" valign="top"><p class="docText">thread stack address size</p></TD></tr><TR><td class="rightBorder" align="left" valign="top"><p class="docText">TYM</p></td><td class="rightBorder" align="left" valign="top">&nbsp;</td><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_POSIX_TYPED_MEMORY_OBJECTS</tt></p></td><td class="docTableCell" align="left" valign="top"><p class="docText">typed memory objects (real-time)</p></td></tr><tr><td class="rightBorder" align="left" valign="top"><p class="docText">XSI</p></td><td class="rightBorder" align="center" valign="top"><p class="docText">&#8226;</P></TD><td class="rightBorder" align="left" valign="top"><p class="docText"><tt>_XOPEN_UNIX</tt></P></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">X/Open extended interfaces</p></TD></TR><TR><td class="rightBorder" align="left" valign="top"><p class="docText">XSR</P></td><TD class="rightBorder" align="left" valign="top">&nbsp;</TD><TD class="rightBorder" align="left" valign="top"><p class="docText"><tt>_XOPEN_STREAMS</tt></p></TD><TD class="docTableCell" align="left" valign="top"><p class="docText">XSI STREAMS</p></TD></TR></table></p><br>
<p class="docText">POSIX.1 does not include the notion of a superuser. Instead, certain operations require &quot;appropriate privileges,&quot; although POSIX.1 leaves the definition of this term up to the implementation. UNIX systems that conform to the Department of Defense security guidelines have many levels of security. In this text, however, we use the traditional terminology and refer to operations that require superuser privilege.</p>
<p class="docText"><a name="idd1e9109"></a><a name="idd1e9114"></a><a name="idd1e9119"></a><a name="idd1e9124"></a><a name="idd1e9129"></a><a name="idd1e9132"></a><a name="idd1e9137"></a><a name="idd1e9142"></a><a name="idd1e9147"></a><a name="idd1e9150"></a><a name="idd1e9153"></a><a name="idd1e9158"></a><a name="idd1e9163"></a><a name="idd1e9168"></a><a name="idd1e9173"></a><a name="idd1e9178"></a><a name="idd1e9183"></a><a name="idd1e9186"></a><a name="idd1e9191"></a><a name="idd1e9196"></a><a name="idd1e9201"></a><a name="idd1e9206"></a><a name="idd1e9211"></a><a name="idd1e9216"></a><a name="idd1e9221"></a><a name="idd1e9226"></a><a name="idd1e9231"></a><a name="idd1e9236"></a><a name="idd1e9241"></a><a name="idd1e9246"></a><a name="idd1e9251"></a><a name="idd1e9256"></a><a name="idd1e9261"></a>After almost twenty years of work, the standards are mature and stable. The POSIX.1 standard is maintained by an open working group known as the Austin Group (<tt>http://www.opengroup.org/austin</tt>). To ensure that they are still relevant, the standards need to be either updated or reaffirmed every so often.</p>

<a name="ch02lev2sec3"></a>
<H4 class="docSection2Title">2.2.3. The Single UNIX Specification</h4>
<p class="docText">The Single UNIX Specification, a superset of the POSIX.1 standard, specifies additional interfaces that extend the functionality provided by the basic POSIX.1 specification. The complete set of system interfaces is called the <span class="docEmphasis">X/Open System Interface</span> (XSI). The <tt>_XOPEN_UNIX</tt> symbolic constant identifies interfaces that are part of the XSI extensions to the base POSIX.1 interfaces.</P>
<p class="docText">The XSI also defines which optional portions of POSIX.1 must be supported for an implementation to be deemed <span class="docEmphasis">XSI conforming</span>. These include file synchronization, memory-mapped files, memory protection, and thread interfaces, and are marked in <a class="docLink" href="#ch02fig05">Figure 2.5</a> as &quot;SUS mandatory.&quot; Only XSI-conforming implementations can be called UNIX systems.</p>
<blockquote>
<p class="docText"><a name="idd1e9298"></a><a name="idd1e9303"></a><a name="idd1e9308"></a><a name="idd1e9313"></a><a name="idd1e9318"></a><a name="idd1e9323"></a><a name="idd1e9328"></a><a name="idd1e9333"></a><a name="idd1e9338"></a><a name="idd1e9343"></a><a name="idd1e9348"></a><a name="idd1e9353"></a><a name="idd1e9358"></a><a name="idd1e9363"></a><a name="idd1e9368"></a><a name="idd1e9373"></a><a name="idd1e9378"></a><a name="idd1e9383"></a><a name="idd1e9388"></a><a name="idd1e9393"></a><a name="idd1e9398"></a><a name="idd1e9401"></a><a name="idd1e9406"></a><a name="idd1e9411"></a><a name="idd1e9416"></a><a name="idd1e9421"></a><a name="idd1e9426"></a><a name="idd1e9431"></a><a name="idd1e9436"></a><a name="idd1e9441"></a><a name="idd1e9446"></a><a name="idd1e9451"></a><a name="idd1e9456"></a><a name="idd1e9461"></a><a name="idd1e9466"></a><a name="idd1e9471"></a><a name="idd1e9476"></a>The Open Group owns the UNIX trademark and uses the Single UNIX Specification to define the interfaces an implementation must support to call itself a UNIX system. Implementations must file conformance statements, pass test suites that verify conformance, and license the right to use the UNIX trademark.</P>
</blockquote>
<p class="docText"><a name="idd1e9486"></a><a name="idd1e9489"></a>Some of the additional interfaces defined in the XSI are required, whereas others are optional. The interfaces are divided into <span class="docEmphasis">option groups</span> based on common functionality, as follows:</p>
<ul><li><p class="docList"><a name="idd1e9502"></a><a name="idd1e9505"></a><a name="idd1e9510"></a><a name="idd1e9513"></a><a name="idd1e9518"></a><a name="idd1e9523"></a><a name="idd1e9526"></a><a name="idd1e9531"></a><a name="idd1e9534"></a><a name="idd1e9541"></a><a name="idd1e9544"></a><a name="idd1e9547"></a><a name="idd1e9550"></a><a name="idd1e9553"></a><a name="idd1e9556"></a><a name="idd1e9563"></a><a name="idd1e9568"></a><a name="idd1e9573"></a><a name="idd1e9578"></a><a name="idd1e9583"></a><a name="idd1e9588"></a>Encryption: denoted by the <tt>_XOPEN_CRYPT</tt> symbolic constant</p></li><li><p class="docList">Real-time: denoted by the <tt>_XOPEN_REALTIME</tt> symbolic constant</p></li><li><p class="docList">Advanced real-time</p></li><li><p class="docList">Real-time threads: denoted by the <tt>_XOPEN_REALTIME_THREADS</tt> symbolic constant</p></li><li><p class="docList">Advanced real-time threads</p></li><LI><p class="docList">Tracing</P></li><LI><p class="docList">XSI STREAMS: denoted by the <tt>_XOPEN_STREAMS</tt> symbolic constant</P></LI><li><p class="docList">Legacy: denoted by the <tt>_XOPEN_LEGACY</tt> symbolic constant</P></LI></UL>
<p class="docText">The Single UNIX Specification (SUS) is a publication of The Open Group, which was formed in 1996 as a merger of X/Open and the Open Software Foundation (OSF), both industry consortia. X/Open used to publish the <span class="docEmphasis">X/Open Portability Guide</span>, which adopted specific standards and filled in the gaps where functionality was missing. The goal of these guides was to improve application portability past what was possible by merely conforming to published standards.</p>
<p class="docText">The first version of the Single UNIX Specification was published by X/Open in 1994. It was also known as &quot;Spec 1170,&quot; because it contained roughly 1,170 interfaces. It grew out of the Common Open Software Environment (COSE) initiative, whose goal was to further improve application portability across all implementations of the UNIX operating system. The COSE groupSun, IBM, HP, Novell/USL, and OSFwent further than endorsing standards. In addition, they investigated interfaces used by common commercial applications. The resulting 1,170 interfaces were selected from these applications, and also included the X/Open Common Application Environment (CAE), Issue 4 (known as &quot;XPG4&quot; as a historical reference to its predecessor, the X/Open Portability Guide), the System V Interface Definition (SVID), Edition 3, Level 1 interfaces, and the OSF Application Environment Specification (AES) Full Use interfaces.</P>
<p class="docText">The second version of the Single UNIX Specification was published by The Open Group in 1997. The new version added support for threads, real-time interfaces, 64-bit processing, large files, and enhanced multibyte character processing.</p>
<p class="docText">The third version of the Single UNIX Specification (SUSv3, for short) was published by The Open Group in 2001. The Base Specifications of SUSv3 are the same as the IEEE Standard 1003.1-2001 and are divided into four sections: Base Definitions, System Interfaces, Shell and Utilities, and Rationale. SUSv3 also includes X/Open Curses Issue 4, Version 2, but this specification is not part of POSIX.1.</P>
<p class="docText">In 2002, ISO approved this version as International Standard ISO/IEC 9945:2002. The Open Group updated the 1003.1 standard again in 2003 to include technical corrections, and ISO approved this as International Standard ISO/IEC 9945:2003. In April 2004, The Open Group published the Single UNIX Specification, Version 3, 2004 Edition. It included more technical corrections edited in with the main text of the standard.</P>

<a name="ch02lev2sec4"></a>
<H4 class="docSection2Title">2.2.4. FIPS</h4>
<p class="docText"><a name="idd1e9672"></a><a name="idd1e9675"></a><a name="idd1e9678"></a><a name="idd1e9681"></a><a name="idd1e9684"></a><a name="idd1e9687"></a><a name="idd1e9690"></a><a name="idd1e9693"></a><a name="idd1e9696"></a><a name="idd1e9699"></a><a name="idd1e9702"></a><a name="idd1e9705"></a><a name="idd1e9708"></a><span class="docEmphasis">FIPS</span> stands for Federal Information Processing Standard. It was published by the U.S. government, which used it for the procurement of computer systems. FIPS 1511 (April 1989) was based on the IEEE Std. 1003.11988 and a draft of the ANSI C standard. This was followed by FIPS 1512 (May 1993), which was based on the IEEE Standard 1003.11990. FIPS 1512 required some features that POSIX.1 listed as optional. All these options have been included as mandatory in POSIX.1-2001.</P>
<p class="docText">The effect of the POSIX.1 FIPS was to require any vendor that wished to sell POSIX.1-compliant computer systems to the U.S. government to support some of the optional features of POSIX.1. The POSIX.1 FIPS has since been withdrawn, so we won't consider it further in this text.</P>


<a href="17021535.html"><img src="images/pixel.gif" alt="" width="1" height="1" border="0"></a><ul></UL></TD></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/team.gif" width="60" height="17" border="0" align="absmiddle"  alt="Team BBL"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=ch02lev1sec1.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<a href=ch02lev1sec3.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
</body></html><br>
<table width="100%" cellspacing="0" cellpadding="0"
style="margin-top: 0pt; border-collapse: collapse;"> 
<tr> <td align="right" style="background-color=white; border-top: 1px solid gray;"> 
<a href="http://www.zipghost.com/" target="_blank" style="font-family: Tahoma, Verdana;
 font-size: 11px; text-decoration: none;">The CHM file was converted to HTM by Trial version of <b>ChmD<!--222-->ecompiler</b>.</a>
</TD>
</TR><tr>
<td align="right" style="background-color=white; "> 
<a href="http://www.etextwizard.com/download/cd/cdsetup.exe" target="_blank" style="font-family: Tahoma, Verdana;
 font-size: 11px; text-decoration: none;">Download <b>ChmDec<!--222-->ompiler</b> at: http://www.zipghost.com</a>
</TD></tr></table>
